
my @people = qw (zhangsan lisi wangwu);
my @sorted = sort @people;#@people here means this array self
my $count  = @people; #@people here means the number of elements in this array
my $number = @people + 40;
print "@sorted", "\n";
print "$count, $number\n";

# function scalar usage
# Function scalar() tells perl to give its argument a scalar context.
print "I have [ @people ] persons.\n";
print "I have [ ", scalar(@people), " ] persons.\n";
print "I have [ ", scalar(@people), " ] persons.\n";

# line-input operator <>
open (FP, "<", "./c-quotes.pl");
my $line = <FP>;
my @leftLines = <FP>;
print "line=$line";
print "\n\nleftLines are the following:\n";
print "@leftLines";
close FP;